<?php
/**
 * Request to set roster
 * 
 * @package stanza.iq.roster
 */
class Zend_Jabber_Stanza_Request_Iq_Roster_Set extends Zend_Jabber_Stanza_Request_Iq_Roster_Abstract {
    /**
     * Create new roster update request. This object is used to create, edit or delete roster item
     * 
     * @param Zend_Jabber_AddressBook_Item $Item Roster item
     */
    public function __construct(Zend_Jabber_AddressBook_Item $item) {
        parent::__construct();
        
        $queryNode = $this->dom->createElement('query');
        $queryNode->setAttribute('xmlns', $this->getNamespace());
        $this->iqNode->appendChild($queryNode);
        
        $itemNode = $this->dom->importNode($item->toDom()->firstChild, true);
        $queryNode->appendChild($itemNode);
    }
}
?>